//
//  RecommendedProductController.m
//  HelloWorld
//
//  Created by Beomjun Kim on 09. 09. 21.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "RecommendedProductController.h"


@implementation RecommendedProductController

-(RecommendedProductController *) initWithTitle: (id) title
{
	self = [super init];
	// brightness = (NSString *)title;
	// self.title = [NSString stringWithFormat:@"%d%%", brightness * 10];
	self.title = title;
	[self.tabBarItem initWithTitle:self.title image:nil tag:0];
	return self;
}


- (void)loadView
{
	// 컨텐트 뷰 설정
	UITextView *contentView = [[UITextView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
	
	contentView.textAlignment = UITextAlignmentCenter;
	contentView.font = [UIFont fontWithName:@"Georgia" size:32.0f];
	[contentView setEditable:NO];
	
	contentView.autoresizesSubviews = YES;
	contentView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
	
	self.view = contentView;
	[contentView release];
	
	[(UITextView *) self.view setText:@"\nXML로 하나의 추천 상품을 가져온다."];
	
	/*
	// 현재 밝기로 뷰를 만든다.
	UIView *contentView = [[UIView alloc] init];
	float percent = brightness * 0.1;
	contentView.backgroundColor = [UIColor colorWithRed:percent green:percent blue:percent alpha:1.0];
	contentView.autoresizesSubviews = YES;
	contentView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
	self.view = contentView;
    [contentView release];
	 */
}

@end